import VueRouter from 'vue-router'

import home from './components/tabbar/HomeContainer.vue'
import member from './components/tabbar/MemberContainer.vue'
import shopcart from './components/tabbar/ShopCartContainer.vue'
import search from './components/tabbar/SearchContainer.vue'
import newList from './components/news/newListContainer.vue'
import newsinfo from './components/news/NewsInfo.vue'
// 3. 创建路由对象
var router = new VueRouter({
  routes: [
   
    {path:'/',redirect:'/home'},
    {path:'/home',component:home},
    {path:'/member',component:member},
    {path:'/shopcart',component:shopcart},
    {path:'/search',component:search},
    {path:'/home/newList',component:newList},
    {path:'/home/newsinfo/:id',component:newsinfo}
    
  ],
  linkActiveClass:'mui-active'
})

// 把路由对象暴露出去
export default router